/*
Copyright 2007 Julian Asamer

This file is part of Fractalicious.

    Fractalicious is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Fractalicious is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Fractalicious.  If not, see <http://www.gnu.org/licenses/>.
*/


//Views the fractal and takes care of the mouse events.
//You'll find the well documented "real pinching" code in FView.m in the gestureChanged method.
#import <CoreFoundation/CoreFoundation.h>
#import <Foundation/Foundation.h>
#import <UIKit/CDStructures.h>
#import <UIKit/UIThreePartButton.h>
#import <UIKit/UIView-Hierarchy.h>
#import <UIKit/UIHardware.h>
#import <GraphicsServices/GraphicsServices.h>


@class Line2D;
@class NSAffineTransform;
@class DrawingData;
@class Point2D;
@class FOptionsSlider;
@class FOptionsCheckbox;
@class FOptionsColor;
@class DrawableFractal;

@interface FView : UIView
{
	Line2D *lastPos;
	NSAffineTransform *acat;
	
	Point2D *lastFingerPos;
	id draggedDragable;
	id delegate;
	
	DrawableFractal * data;
	
	FOptionsColor *fgcolor;
	FOptionsColor *bgcolor;
	FOptionsSlider *stroke;
	FOptionsCheckbox *dyn_stroke;
	FOptionsCheckbox *dyn_color;
	FOptionsCheckbox *only_last;
	FOptionsCheckbox *first_not;
	FOptionsCheckbox *dr_draggables;
	FOptionsSlider *dyn_color_f;
}
 
	+ (CGColorRef)colorWithRed:(float)red green:(float)green 
			blue:(float)blue 	alpha:(float)alpha;

	-(void) drawRect:(CGRect)rect;
	-(id)init;
	-(void) reset;
	-(void)setDelegate:(id) d;
	-(id) delegate;
	-(void) setFractalData: (DrawableFractal *)df;
	-(id)fractalData;
	
@end